using System;
using System.Collections.Generic;
using System.Linq;
namespace MicroMsg.UI.Page
{
	public class AreaCode
	{
		public string mStrArea2WName;
		public string mStrAreaCode;
		public string mStrAreaName;
		public string mStrOrderKey;
		public override string ToString()
		{
			return "+" + this.mStrAreaCode + " " + this.mStrAreaName;
		}
		public static AreaCode createInstance(string strAreaInfo)
		{
			strAreaInfo = strAreaInfo.Replace("\r\n", "");
			List<string> list = Enumerable.ToList<string>(strAreaInfo.Split(new string[]
			{
				":"
			}, 1));
			if (list != null)
			{
				if (4 == list.get_Count())
				{
					return new AreaCode
					{
						mStrArea2WName = list.get_Item(0),
						mStrAreaCode = list.get_Item(1),
						mStrAreaName = list.get_Item(2),
						mStrOrderKey = list.get_Item(3)
					};
				}
			}
			return null;
		}
		public static int Compare(AreaCode obj1, AreaCode obj2)
		{
			return obj1.mStrOrderKey.CompareTo(obj2.mStrOrderKey);
		}
		public bool IsEqualTo(string strInfo)
		{
			return strInfo != null && (strInfo.Contains(this.mStrAreaCode) && strInfo.Contains(this.mStrAreaName));
		}
	}
}
